<?php
namespace Home\Controller;


class TestController extends HomeController{
    
    public function Api(){
        if(IS_POST){
            $url=I('url');
            $prm=I('prm');
            $action = I('action');
            vendor('Hprose.HproseHttpClient');
            $client = new \HproseHttpClient($url);
            $arr_content = explode("\r\n", $prm);
            $result = $client->$action();
        }
        else{
            $this->display();
        }
        
    }
    
    public function login(){
        vendor('Hprose.HproseHttpClient');
        $client = new \HproseHttpClient("http://hjdteam.hjd.com/api/user");
        $result=$client->test();
        echo $result;
    }
}